# 算数运算符
# + 加法
# - 减法
# * 乘法
# / 除法
# ** 幂运算
# % 取模运算
# // 取整除运算
a = 10
b = 3
print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a ** b)
print(a % b)
print(a // b)

print("====" * 10)

# 比较运算符
# == 等于
#!= 不等于
# > 大于
# < 小于
# >= 大于等于
# <= 小于等于
print(a == b)
print(a!= b)
print(a > b)
print(a < b)
print(a >= b)
print(a <= b)

print("====" * 10)

# 赋值运算符
# = 赋值
# += 加等于
# -= 减等于
# *= 乘等于
# /= 除等于
# **= 幂等于
# %= 取模等于
# //= 取整除等于
a = 10
a += 5
print(a)
a -= 3
print(a)
a *= 2
print(a)
a /= 4
print(a)
a **= 2
print(a)
a %= 3
print(a)
a //= 2
print(a)

print("====" * 10)

# 逻辑运算符
# and 与
# or 或
# not 非
print(True and True)
print(True and False)
print(False and True)
print(False and False)
print(True or True)
print(True or False)
print(False or True)
print(False or False)
print(not True)
print(not False)

print("====" * 10)

# 位运算符
# & 按位与
# | 按位或
# ^ 按位异或
# ~ 按位取反
# << 左移
# >> 右移
a = 0b1100
b = 0b0110
print(a & b)
print(a | b)
print(a ^ b)
print(~a)
print(a << 2)
print(a >> 2)

print("====" * 10)

# 成员运算符
# in 属于
# not in 不属于
print(1 in [1, 2, 3])
print(4 not in [1, 2, 3])

print("====" * 10)

# 身份运算符
# is 同一对象
# is not 不同对象
a = [1, 2, 3]
b = a
print(a is b)
print(a is not b)
c = [1, 2, 3]
print(a is c)
print(a is not c)